|
|
|
|
|
|
|
Write a For...Next loop that loops from 1 to 100 and only prints the value 50 when the loop variable becomes 50. |
|
|
|
 |
|
|
|
|
For intLoop = 1 To 100
If intLoop = 50 Then
Print intLoop
End If
Next |
|
|
|
|
|
|
|
|
Chapter 9: Procedures and Functions |
|
|
|
|
|
|
|
|
True or false? You may use a letter or underscore as the first character for a procedure name. |
|
|
|
|
|
|
|
|
Whats the file extension used for code modules? |
|
|
|
|
|
|
|
|
True or false? Global variables are declared in the declarations section of code modules or forms. |
|
|
|
|
|
|
|
|
Answer: False. They need to be declared in BAS modules. |
|
|
|
 |
|
|
|
|
Dim intTemp As Integer
Dim strName As String
intTemp = 5
strName = " Bill"
Call Proc1(intTemp, strName)
Me.Print intTemp
Me.Print strName
Sub Proc1(intParm As Integer, strValue As String)
intParm = 10
strValue = " Hi There"
End Sub |
|
|
|
|
|
|
|
|
For Me.Print intTemp, what is displayed? |
|
|
|
|
|